package org.example.guavalearn.bloomfilter;

import java.util.HashMap;
import java.util.Map;

class DefaultCrawler implements Crawler {

    private final Map<String, String> keys;

    public DefaultCrawler() {
        this.keys = new HashMap<>();
    }

    @Override
    public void put(String key) {
        keys.put(key, key);
    }

    @Override
    public boolean contains(String key) {
        return keys.containsKey(key);
    }

    @Override
    public String test(String key) {
        return String.valueOf(contains(key));
    }
}
